package com.adresvseti.wallpaperoid.bitmap;

import java.lang.ref.WeakReference;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;

public class AsyncDrawable<AsyncTask> extends BitmapDrawable {
	
    private final WeakReference<AsyncTask> asyncTaskReference;

    public AsyncDrawable(Resources res, Bitmap bitmap, AsyncTask asyncTask) {
        super(res, bitmap);
        
        asyncTaskReference = new WeakReference<AsyncTask>(asyncTask);
    }

    public AsyncTask getAsyncTask() {
        return asyncTaskReference.get();
    }
}
